home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 176-200 / disk_191 / blk / std.h < prev   
C/C++ Source or Header  |  1992-05-06  |  626b  |  20 lines

  1. #define NEW(typ) (typ*)AllocMem((long)sizeof(typ),0L)
  2. #define FREE(p,typ) FreeMem(p,(long)sizeof(typ))
  3.  
  4. #define NEW_N(typ,n) (typ*)AllocMem((long)((n)*sizeof(typ)),0L)
  5. #define FREE_N(p,typ,n) FreeMem(p,(long)((n)*sizeof(typ)))
  6.  
  7. #define NEW_X(typ,x) (typ*)AllocMem((long)(sizeof(typ)+(x)),0L)
  8. #define FREE_X(p,typ,x) FreeMem(p,(long)(sizeof(typ)+(x)))
  9.  
  10. #define FREI(p) FreeMem(p,(long)sizeof(*p))
  11.  
  12. #ifndef FINAL_VERSION
  13. #define ASSERT(c) if (!(c)) printf ("assert failure in %s (%s : %d)\n", \
  14.    __FUNC__,__FILE__,__LINE__)
  15. #else
  16. #define ASSERT(c)
  17. #endif
  18.  
  19. #define MAKE_ID(a,b,c,d) (((long)a<<24)|((long)b<<16)|((long)c<<8)|d)
  20.